Imports System.Data.SqlClient
Public Class TraineeFamilies
    Public Shared Function GetTraineeFamiies() As DataTable
        Str = "SELECT TRAINEE_FAMILY_ID,TRAINEE_NAME=ENGLISH_NAME +' ( '+KHMER_NAME+' )' ,RELATIVE_NAME,RELATIVE_TYPE,DOB,OCCUPATION,NOTE,PHONE,ADDRESS,ACTIVE FROM  VIEW_TRAINEE_FAMILY  WHERE ACTIVE=1 ORDER BY TRAINEE_FAMILY_ID ASC"


        Try


            Dim dataAdapter As SqlDataAdapter
            dataAdapter = New SqlDataAdapter(Str, CType(Dbinterface.Connection, SqlConnection))
            Dim dataTable As DataTable = New DataTable()
            dataAdapter.Fill(dataTable)
            Return dataTable
        Catch ex As Exception
            MessageBox.Show(ex.ToString)
            Return Nothing
        End Try
    End Function
End Class